var xml2js = require('xml2js');
var util = require('util');

var myxml = "<xml><ToUserName><![CDATA[toUser]]></ToUserName><FromUserName><![CDATA[fromUser]]></FromUserName><CreateTime>1348831860</CreateTime><MsgType><![CDATA[text]]></MsgType><Content><![CDATA[this is a test]]></Content><MsgId>1234567890123456</MsgId></xml>";
// var myxml = "<root>Hello xml2js!</root>";
 xml2js.parseString(myxml, function (e, r) {
 	var obj=new xml2js.Builder().buildObject(r);
 	console.log(util.inspect(r, false, null));
 	// console.log(r.root+"");
 	
 	console.log(util.format(r.xml.ToUserName));
 	console.log(r.xml.ToUserName+"");
	console.log(r.xml.MsgId+"");
});